# # BAD
# def disable_agent(ip):
#     if not IP_DATA.get(ip):
#         return {"code": ErrorCode.UnknownError, "message": "没有查询到 IP 对应主机"}
#
#
# # GOOD
# def disable_agent(ip):
#     """
#     :raises: 当找不到对应信息时，抛出 UNABLE_TO_DISABLE_AGENT_NO_MATCH_HOST
#     """
#     if not IP_DATA.get(ip):
#         raise ErrorCode.UNABLE_TO_DISABLE_AGENT_NO_MATCH_HOST